<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<Com.Mathphoenix.MapApps.NerdDinner.Helpers.PaginatedList<Com.Mathphoenix.MapApps.NerdDinner.Models.Dinner>>" %>

<asp:Content ID="Main" ContentPlaceHolderID="MainContent" runat="server">
    <h2>
        Upcoming dinners</h2>
    <ul>
        <% foreach (var dinner in Model)
           {%>
        <li>
            <%=Html.ActionLink(dinner.Title,"Details",new {id=dinner.DinnerID}) %>
            on
            <%=Html.Encode(dinner.EventDate.ToShortDateString()) %>
            @
            <%=Html.Encode(dinner.EventDate.ToShortTimeString()) %>
        </li>
        <%} %>
    </ul>
    <% if (Model.HasPreviousPage)
       {%>
    <%= Html.RouteLink("<<<","UpcomingDinners", new{page=(Model.PageIndex-1)}) %>
    <%} %>
    <% if (Model.HasNextPage)
       { %>
    <%=Html.RouteLink(">>>","UpcomingDinners",new{page=(Model.PageIndex+1)}) %>
    <%} %>
</asp:Content>
